<h4 id="Docker_Container"><b>Docker Container</b></h4>
<button type="button" class="btn btn-default" @click="ContainerRefresh()" >刷新数据</button>
<div class="">
    <table class="table table-hover" style="word-break:break-all; word-wrap:break-all;">
        <thead>
        <tr>
            <th style="width: 8%;">Id</th>
            <th style="width: 8%;">Names</th>
            <th style="width: 8%;">Image</th>
            <th style="width: 8%;">Created</th>
            <th style="width: 8%;">Ports</th>
            <th style="width: 10%;">Status</th>
            <th style="width: 30%;">性能</th>
            <th style="width: 20%;">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="item in container">
            <td>{{item.Id}}</td>
            <td>{{item.Names}}</td>
            <td>{{item.Image}}</td>
            <td>{{item.Created | timestampToTime}}</td>
            <td>{{item.Ports}}</td>
            <td>{{item.Status}}</td>
            <td>
                <div class="row">
                    <div class="col-md-6">
                        CPU:
                        <div class="progress">
                            <span :id="item.Id+'_cpu'">采集中...</span>
                            <div :id="item.Id+'_cpu_v'" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        MEM: <span :id="item.Id+'_mem'"></span>
                        <div class="progress">
                            <span :id="item.Id+'_mem_n'">采集中...</span>
                            <div :id="item.Id+'_mem_v'" class="progress-bar progress-bar-warning" role="progressbar" :aria-valuenow="item.mem" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                            </div>
                        </div>
                    </div>
                </div>

            </td>
            <td>
                <button type="button" class="btn btn-default btn-sm" @click="OpenContainerModal(item)"> 查看详情</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerStop(item.Id)">停止</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerRm(item.Id)">停止并删除</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerLog(item.Id)">查看日志</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerTop(item.Id)">查看进程</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerRenameOpen(item.Id)">修改名称</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerRestart(item.Id)">重启</button>
                <button type="button" class="btn btn-default btn-sm" @click="ContainerMonitor(item.Id)">实时监控性能</button>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<hr>

<!-- 容器 详情弹出层 -->
<div class="modal fade" id="DockerContainerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-target=".bs-example-modal-lg">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 900px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Container Info</h4>
            </div>
            <div class="modal-body">
                <dl class="dl-horizontal">
                    <dt>Id</dt><dd>{{now_container.Id}}</dd>
                    <dt>Names</dt><dd>{{now_container.Names}}</dd>
                    <dt>Image</dt><dd>{{now_container.Image}}</dd>
                    <dt>ImageID</dt><dd>{{now_container.ImageID}}</dd>
                    <dt>Command</dt><dd>{{now_container.Command}}</dd>
                    <dt>Created</dt><dd>{{now_container.Created}}</dd>
                    <dt>Ports</dt><dd>{{now_container.Ports}}</dd>
                    <dt>Labels</dt><dd>{{now_container.Labels}}</dd>
                    <dt>State</dt><dd>{{now_container.State}}</dd>
                    <dt>Status</dt><dd>{{now_container.Status}}</dd>
                    <dt>HostConfig</dt><dd>{{now_container.HostConfig}}</dd>
                    <dt>NetworkSettings</dt><dd>{{now_container.NetworkSettings}}</dd>
                    <dt>Mounts</dt><dd>{{now_container.Mounts}}</dd>
                </dl>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!-- 容器进程 -->
<div class="modal fade" id="DockerContainerTopModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-target=".bs-example-modal-lg">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 900px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Container Info</h4>
            </div>
            <div class="modal-body">
                {{container_top}}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!-- 容器修改名称 -->
<div class="modal fade" id="ContainerRenameModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-target=".bs-example-modal-lg">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 900px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Container Info</h4>
            </div>
            <div class="modal-body">
                <div class="input-group">
                    <span class="input-group-addon">新名称</span>
                    <input type="text" id="new_name" class="form-control" placeholder="" aria-describedby="basic-addon1">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" @click="ContainerRename()">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>